package internal

import (
	"context"

	fpyDcsDb "gf/fpy/dcs/db"
)

func init() {
	fpyDcsDb.SetSoPath("./fpy/dcs/db/.so/db.so")
	fpyDcsDb.SetDbUrl("http://192.168.8.101:11001")
	fpyDcsDb.SetDbSid("0ao6")
}

type AdmAdminGroupDao struct {
	sid 	string
	dbSid   string
	projectSid 	string
	table   string
	group   string
	columns TAdmAdminGroupColumns
}

type TAdmAdminGroupColumns struct {
    Sid    string
    AddTime    string
    UpdateTime    string
    IsDel    string
    GroupName    string
    Sort    string
}


var cAdmAdminGroupColumns = TAdmAdminGroupColumns{
    Sid:    "sid",
    AddTime:    "add_time",
    UpdateTime:    "update_time",
    IsDel:    "is_del",
    GroupName:    "group_name",
    Sort:    "sort",
}

func NewAdmAdminGroupDao() *AdmAdminGroupDao {
	return &AdmAdminGroupDao{
		sid: 	"0ap7",
		dbSid:	"0ao6",
		projectSid:	"dbd3",
		group:   "adm",
		table:   "admin_group",
		columns: cAdmAdminGroupColumns,
	}
}

func (dao *AdmAdminGroupDao) Columns() TAdmAdminGroupColumns {
	return dao.columns
}

func (dao *AdmAdminGroupDao) Group() string {
	return dao.group
}

func (dao *AdmAdminGroupDao) Table() string {
	return dao.table
}

func (dao *AdmAdminGroupDao) Ctx(ctx context.Context) *fpyDcsDb.TDb {
	return fpyDcsDb.Ctx(ctx).Table(dao.sid).FpyProjectSid(dao.projectSid)
}